Optimal. Leaf size=37 \[ -\frac{i a (d \cot (e+f x))^n \, _2F_1(1,n;n+1;-i \cot (e+f x))}{f n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0713237, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {3673, 3537, 64} \[ -\frac{i a (d \cot (e+f x))^n \, _2F_1(1,n;n+1;-i \cot (e+f x))}{f n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3673
Rule 3537
Rule 64
Rubi steps
\begin{align*} \int (d \cot (e+f x))^n (a+i a \tan (e+f x)) \, dx &=d \int (d \cot (e+f x))^{-1+n} (i a+a \cot (e+f x)) \, dx\\ &=-\frac{\left (i a^2 d\right ) \operatorname{Subst}\left (\int \frac{\left (\frac{d x}{a}\right )^{-1+n}}{a^2+i a x} \, dx,x,a \cot (e+f x)\right )}{f}\\ &=-\frac{i a (d \cot (e+f x))^n \, _2F_1(1,n;1+n;-i \cot (e+f x))}{f n}\\ \end{align*}
Mathematica [B] time = 0.807562, size = 166, normalized size = 4.49 \[ -\frac{e^{-i e} 2^{n-1} \left (1+e^{2 i (e+f x)}\right )^{1-n} \left (\frac{i \left (1+e^{2 i (e+f x)}\right )}{-1+e^{2 i (e+f x)}}\right )^{n-1} \cos (e+f x) (a+i a \tan (e+f x)) \, _2F_1\left (1-n,1-n;2-n;\frac{1}{2} \left (1-e^{2 i (e+f x)}\right )\right ) \cot ^{-n}(e+f x) (d \cot (e+f x))^n}{f (n-1) (\cos (f x)+i \sin (f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.337, size = 0, normalized size = 0. \begin{align*} \int \left ( d\cot \left ( fx+e \right ) \right ) ^{n} \left ( a+ia\tan \left ( fx+e \right ) \right ) \, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (i \, a \tan \left (f x + e\right ) + a\right )} \left (d \cot \left (f x + e\right )\right )^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{2 \, a \left (\frac{i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} - 1}\right )^{n} e^{\left (2 i \, f x + 2 i \, e\right )}}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \left (d \cot{\left (e + f x \right )}\right )^{n}\, dx + \int i \left (d \cot{\left (e + f x \right )}\right )^{n} \tan{\left (e + f x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (i \, a \tan \left (f x + e\right ) + a\right )} \left (d \cot \left (f x + e\right )\right )^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]